import myRequest from "../index";

// 获取热点资讯
function getGameNews() {
  return myRequest.get("/gameNews");
}

// 获取游戏测评
function getGameJudge() {
  return myRequest.get("/gameJudge");
}

// 获取游戏前瞻
function getGamePre() {
  return myRequest.get("/gamePre");
}

// 获取游戏排行榜
function getGameRanking() {
  return myRequest.get("/gameRanking");
}

// 获取首页游戏卡片数据
function getGameHomeCard() {
  return myRequest.get("/gameCard");
}

// 获取近期大作数据
function getRecentGame(index) {
  return myRequest.get(`/recentGame/${index}`);
}

// 获取steam在线人数榜单
function getSteamOnline() {
  return myRequest.get("/steamRanking");
}

// 获取top200 所有游戏
function getAllGame(page) {
  return myRequest.get(`/allGame/${page}`);
}

// 获取游戏测评卡片数据
function getGameJudgeCard() {
  return myRequest.get("/gameJudgeCard");
}

export {
  getGameNews,
  getGameJudge,
  getGamePre,
  getGameRanking,
  getGameHomeCard,
  getRecentGame,
  getSteamOnline,
  getAllGame,
  getGameJudgeCard,
};
